using System;
using System.Collections.Generic;
using System.Text;

namespace Acms.DataControls
{
    [System.ComponentModel.Designer(typeof(SearchDataSourceDesigner))]
    [System.Web.UI.ToolboxData("<{0}:SearchDataSource runat=server/>")]
    public class SearchDataSource : GenericDataSource<Bll.Search>
    {
    }

    public class SearchDataSourceDesigner : GenericDataSourceDesigner<Bll.Search>
    {
        protected override Acms.Bll.Search GetDesignTimeItem(int index)
        {
            Random rnd = new Random(index);
            string[] names = new string[] { "Home", "My Photos", "Section 1", "User Details", "Issue 1" };
            Bll.Search tmp = Acms.Bll.Search.CreateInstance();
            tmp.DisplayName = names[rnd.Next(0, names.Length)];
            tmp.Name = tmp.DisplayName.Replace(" ", "");
            tmp.SiteId = 1;
            tmp.ParentId = 2;
            tmp.TemplateId = 1;
            return tmp;
        }
    }

}
